package offer.singleton;
// 四种安全,一种不安全
class MyThread extends Thread {
    @Override
    public void run() {
        System.out.println(Five.obj.hashCode());
    }
}

public class Test {
    public static void main(String[] args) {
       /* MyThread t1 = new MyThread();
        MyThread t2 = new MyThread();
        MyThread t3 = new MyThread();
        t1.start();
        t2.start();
        t3.start();*/
        for (int i = 0; i < 30; i++) {
            MyThread t1 = new MyThread();
            t1.start();
        }

    }
}
